Creating a Link to a Multimedia File

Let’s now learn to create a link to open a multimedia object. To do this, use the href attribute of the <a> tag to specify the path of the multimedia object.

Let’s do the following steps to create a link to a multimedia file on a Web page:


<!DOCTYPE html>
<html>
<head>
    <title> Creating link to a Multimedia</title>
</head>
<body>
<center>
    <h1>Link to a Multimedia File</h1>
    <table border=”1”>
        <tr align=”center”>
            <th rowspan=”2”>
                <h2>What to do you want?</h2>
            </th>
            <td> To Listen Music Click <a href=”Audio.wma> Music!!! </a></td>
        </tr>
        <tr align=”center”>
            <td> To watch a Video Click <a href=”video.mp3” >Video !!! </a></td>
        </tr>
    </table>
</center>
</body>
</html>

Save the document with the name LinkMultimedia.html and open on browser.

Click a hyperlink. The referenced file opens.

When you click a link to multimedia file, the file does not open on a Web page; instead, it opens in a media player.